const { injectBabelPlugin } = require('react-app-rewired');
const rewireLess = require('react-app-rewire-less');
const rewireMobX = require('react-app-rewire-mobx');
const rewireCssModules = require('react-app-rewire-css-modules');

module.exports = function override(config, env) {
  
  config = injectBabelPlugin(['import', { libraryName: 'antd', style: true }], config);
  config = rewireMobX(config, env);
  config = rewireCssModules(config, env);
  config = rewireLess.withLoaderOptions({
    modifyVars: { 
      // "@primary-color": "#1A1A1A" 
    },
  })(config, env);

  return config;
};